<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
//     let str = '';
//     let work = 'abcm王fhoah者chauhf荣耀'
// for(i=0;i<work.length;i++){
//     if(i == work.indexOf('王')||i == work.indexOf('者')||i == work.indexOf('荣')||i == work.indexOf('耀')){
//         str += work[i]
//     }
// }
// console.log(str);
//1逆序输出



//3小写字符串
// let str = 'CHINESE'
// console.log(str.toLowerCase());
//6驼峰命名
let str = 'CHINESE'
str = str.replace(str[0],str[0].toUpperCase()+str.slice(1,7))
console.log(str);
// for(var i=0;i<num.length;i++){

// }
// console.log();
</script>